From: Herbert Xu Date: Wed, 27 May 2015 06:37:34 +0000 (+0800) Subject: crypto: echainiv - Fix IV size in context size calculation X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~4320^2~125 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9d03aee125d73908ddbe9c1b96338c9b69e1abc0;p=linux-4.9.git crypto: echainiv - Fix IV size in context size calculation This patch fixes a bug in the context size calculation where we were still referring to the old cra_aead. Signed-off-by: Herbert Xu --- diff --git a/crypto/echainiv.c b/crypto/echainiv.c index 0f79fc668ad4..62a817faec8c 100644 --- a/crypto/echainiv.c +++ b/crypto/echainiv.c @@ -280,7 +280,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl, inst->alg.base.cra_alignmask |= __alignof__(u32) - 1; inst->alg.base.cra_ctxsize = sizeof(struct echainiv_ctx); - inst->alg.base.cra_ctxsize += inst->alg.base.cra_aead.ivsize; + inst->alg.base.cra_ctxsize += inst->alg.ivsize; done: err = aead_register_instance(tmpl, inst);